37typedef map<TimeStamp, FeatureBasePtr>
Track;
41typedef map<SizeStd, pair<FeatureBasePtr, FeatureBasePtr> >
TrackMatches;
42typedef map<SizeStd, pair<FeatureBaseConstPtr, FeatureBaseConstPtr> >
107 void add(
const SizeStd& _track_id,
const FeatureBasePtr& _ftr);
111 void add(
const FeatureBasePtr& _ftr_existing,
const FeatureBasePtr& _ftr_new);
115 void remove(FeatureBasePtr _ftr);
123 void remove(CaptureBasePtr _cap);
159 FeatureBaseConstPtrList
snapshotAsList(CaptureBaseConstPtr _cap)
const;
191 FeatureBaseConstPtr
feature(
const SizeStd& _track_id, CaptureBaseConstPtr _cap)
const;
195 FeatureBasePtr
feature(
const SizeStd& _track_id, CaptureBasePtr _cap);
215 list<SizeStd>
trackIds(CaptureBaseConstPtr _capture =
nullptr)
const;
219 CaptureBaseConstPtrList
captures()
const;
231 CaptureBaseConstPtr
capture(
const TimeStamp& _ts,
const double& _time_tolerance)
const;
239 CaptureBasePtr
capture(
const TimeStamp& _ts,
const double& _time_tolerance);
256 static SizeStd track_id_count_;
259 map<SizeStd, Track> tracks_;
262 map<CaptureBasePtr, Snapshot> snapshots_;
TimeStamp implements basic functionalities for time stamps.
Definition: time_stamp.h:39
Matrix of tracked features, by track and by snapshot (Captures or time stamps) This class implements ...
Definition: track_matrix.h:91
CaptureBaseConstPtrList captures() const
Returns the captures of all snapshots, ordered by time stamp.
Definition: track_matrix.cpp:388
TrackConst trackAtKeyframes(const SizeStd &_track_id) const
Returns the features of a track whose captures belong to a keyframe (in the problem)
Definition: track_matrix.cpp:329
SnapshotConst snapshot(CaptureBaseConstPtr _capture) const
Returns the snapshot of a capture: its features indexed by track id.
Definition: track_matrix.cpp:52
list< SizeStd > trackIds(CaptureBaseConstPtr _capture=nullptr) const
Returns the ids of the tracks of a capture snapshot (all tracks if nullptr)
Definition: track_matrix.cpp:369
virtual ~TrackMatrix()
Destructor.
Definition: track_matrix.cpp:30
TrackMatchesConst matches(CaptureBaseConstPtr _cap_1, CaptureBaseConstPtr _cap_2) const
Returns the pairs of features of two captures in the same track, indexed by track id.
Definition: track_matrix.cpp:246
CaptureBaseConstPtr capture(const TimeStamp &_ts, const double &_time_tolerance) const
Returns the capture of the snapshot closest to a time stamp, within a time tolerance.
Definition: track_matrix.cpp:412
CaptureBaseConstPtr firstCapture(const SizeStd &_track_id) const
Returns the capture of the oldest feature of a track.
Definition: track_matrix.cpp:309
FeatureBaseConstPtrList snapshotAsList(CaptureBaseConstPtr _cap) const
Returns the features of the snapshot of a capture as a list.
Definition: track_matrix.cpp:227
void remove(FeatureBasePtr _ftr)
Removes a feature from its track and snapshot.
Definition: track_matrix.cpp:132
void add(const SizeStd &_track_id, const FeatureBasePtr &_ftr)
Adds a feature (linked to a capture) to an existing track, setting its track id.
Definition: track_matrix.cpp:81
CaptureBaseConstPtr lastCapture(const SizeStd &_track_id) const
Returns the capture of the newest feature of a track.
Definition: track_matrix.cpp:319
FeatureBaseConstPtr lastFeature(const SizeStd &_track_id) const
Returns the newest feature of a track.
Definition: track_matrix.cpp:189
vector< FeatureBaseConstPtr > trackAsVector(const SizeStd &_track_id) const
Returns the features of a track as a vector, ordered by time stamp.
Definition: track_matrix.cpp:205
TrackConst track(const SizeStd &_track_id) const
Returns a track: its features indexed by time stamp.
Definition: track_matrix.cpp:35
SizeStd numTracks() const
Returns the number of tracks.
Definition: track_matrix.cpp:163
FeatureBaseConstPtr feature(const SizeStd &_track_id, CaptureBaseConstPtr _cap) const
Returns the feature of a track in a capture.
Definition: track_matrix.cpp:293
void cleanSnapshots()
Removes the snapshots of the captures being removed (e.g. when a keyframe is removed)
Definition: track_matrix.cpp:153
void newTrack(FeatureBasePtr _ftr)
Creates a new track with a feature.
Definition: track_matrix.cpp:75
TrackMatrix()
Default constructor.
Definition: track_matrix.cpp:25
FeatureBaseConstPtr firstFeature(const SizeStd &_track_id) const
Returns the oldest feature of a track.
Definition: track_matrix.cpp:173
SizeStd trackSize(const SizeStd &_track_id) const
Returns the number of features of a track.
Definition: track_matrix.cpp:168
Definition: capture_base.h:23
map< SizeStd, FeatureBasePtr > Snapshot
Definition: track_matrix.h:39
map< SizeStd, FeatureBaseConstPtr > SnapshotConst
Definition: track_matrix.h:40
std::size_t SizeStd
Other containers size type for the Wolf project.
Definition: wolf.h:66
map< SizeStd, pair< FeatureBaseConstPtr, FeatureBaseConstPtr > > TrackMatchesConst
Definition: track_matrix.h:43
map< SizeStd, pair< FeatureBasePtr, FeatureBasePtr > > TrackMatches
Definition: track_matrix.h:41
map< TimeStamp, FeatureBaseConstPtr > TrackConst
Definition: track_matrix.h:38
map< TimeStamp, FeatureBasePtr > Track
Definition: track_matrix.h:37